<?php
	/**
	 * @package AmpleHarvest
	 */
	namespace ampleharvest\permissions;
	//namespace ampleharvest\code;
	/**
	 * @brief This class holds all Constants that describe permisions.
	 *
	 * - Revision History
	 * 	- 0.1.2
	 * 	 - <b>Date</b>: 01 FEB 2012
	 * 	 - <b>Author</b>: Ryan Hendrickson
	 * 	  - Added Permissions for commenting.
	 *  - 0.1.1
	 * 	 - <b>Date</b>: 11 APR 2011
	 * 	 - <b>Author</b>: Randy Blancett
	 * 	  - Added Permissions for Harvest Request management
	 *  - 0.1
	 * 	 - <b>Date</b>: 24 MAR 2011
	 * 	 - <b>Author</b>: Randy Blancett
	 * 	  - Initial Version
	 *
	 * @author Randy Blancett
	 * @version 0.1.1
	 * @ingroup code config classes
	 */
	//if (!class_exists("ampleharvest\permissions\cPermissions"))
	//{
		class cPermissions
		{
			/*
			 * ALERT : if you are adding constants to this file be sure to add it to the get_constants function so it will be exposed
			 * 			also update the /DATA/Model/cPermissions.js model to reflect the new items
			 */
			
			
			
			/**
			 * @{
			 * @name Commenting Permissions
			 */
			const C_STR_COMMENTING					= "C_STR_COMMENTING";
			
			const C_STR_PERMISION_COMMENTING_ALL_CRUD = "1C0891C1-E5DB-425C-B214-C34FD4B242E9";
			/**
			* @}
			*/
			
			/**
			 * @{
			 * @name Query Permisions
			 */
			//Saved Queries
			const C_STR_SAVED_QUERIES					= "C_STR_SAVED_QUERIES";
			
			const C_STR_PERMISION_SAVED_QUERY_ADD 		= "051DAC97-9709-4B0F-BC95-316B935B8F3E";
			const C_STR_PERMISION_SAVED_QUERY_VIEW 		= "CFDC2897-3E1D-487D-901D-5DA9788A7DBD";
			const C_STR_PERMISION_SAVED_QUERY_DELETE 	= "0B835331-8EEA-45D3-9456-7C42D7AD3219";
			const C_STR_PERMISION_SAVED_QUERY_EDIT		= "4EC7A2F3-7FA6-44A2-B41C-4EF0510D96EB";
			/**
			 * @}
			 */

			/**
			 * @{
			 * @name Statistics Permisions
			 */
			//Saved Queries
			const C_STR_STATISTICS					= "C_STR_STATISTICS";
			
			const C_STR_PERMISION_STATISTICS_VIEW = "C5B6520B-44E2-4DF2-93EB-895A15E7B22C";
			/**
			 * @}
			 */

			/**
			 * @{
			 * @name Harvest Request Permisions
			 */
			//Harvest Request
			const C_STR_HARVEST_REQUEST					= "C_STR_HARVEST_REQUEST";
			
			const C_STR_PERMISION_HR_SUBMIT = "621FDEAD-8696-4FB3-8810-7E9CA7D25CEE";
			const C_STR_PERMISION_HR_VIEW_ALL = "8D4333D8-3FAF-4FFF-B099-83E8DBA39320";
			const C_STR_PERMISION_HR_EDIT_OWN_STAGE1 = "A8455229-7095-4C08-8B3C-45C7FA61CE41";
			const C_STR_PERMISION_HR_EDIT_OWN_STAGE2 = "F09F38FC-7CF1-44F0-9AA2-0E49A71E32CE";
			const C_STR_PERMISION_HR_EDIT_ALL_STAGE1 = "6A8F0702-1242-43F8-BA95-3D0ED1D94291";
			const C_STR_PERMISION_HR_EDIT_ALL_STAGE2 = "4F959461-B191-4EBD-96C5-94931E4A393A";
			const C_STR_PERMISION_HR_REQUEST_DEACTIVATE_OWN = "0ECB4B1E-29E6-4A61-8EFA-CEBEAC0AF927";
			const C_STR_PERMISION_HR_REQUEST_DEACTIVATE_ALL = "33B35D82-4993-4265-9F51-057791B35706";
			const C_STR_PERMISION_HR_DEACTIVATE = "D0A8FAF8-1049-4341-815C-9A31B029B990";
			const C_STR_PERMISION_HR_VIEW_DISCUSSIONS = "2CF990B4-6DB0-4625-8CE5-8CBB89554E18";
			const C_STR_PERMISION_HR_EDIT_DISCUSSIONS = "615BD873-12CA-49EB-8983-C2ADAE110A84";
			const C_STR_PERMISION_HR_EDIT_STATUS = "636254D8-ECC4-424B-9729-ABC57C536FAD";
			/**
			 * @}
			 */
			
			/**
			 * @{
			 * @name Group Permisions
			 */
			//Groups
			const C_STR_GROUPS					= "C_STR_GROUPS";
			
			const C_STR_PERMISION_GROUP_REQUEST = "C3114458-28A2-4AA5-B01F-93337A1226D8";
			const C_STR_PERMISION_GROUP_APPROVE = "50634C72-CB74-4AAF-B741-66249B489517";
			const C_STR_PERMISION_GROUP_EDIT = "1CB301A5-B5BF-4BF3-B6DF-79ACDC60AE31";
			const C_STR_PERMISION_GROUP_VIEW_INFO = "16A6C6E1-0224-49FF-A979-B12338F0AEE0";
			const C_STR_PERMISION_GROUP_VIEW_PENDING = "34A40C37-5B99-48D3-B821-F2C93B0921D9";
			
			/**
			 * @}
			 */

			/**
			 * @{
			 * @name Data Entry Permisions
			 */
			//Add Data
			const C_STR_DATA					= "C_STR_DATA";
			
			const C_STR_PERMISION_DATA_ADD = "43F3B3C3-B201-43BF-948E-4887A46E2C83";
			const C_STR_PERMISION_DATA_DELETE = "2625FE93-53C2-4C32-B8E7-D6831A7D5F3F";
			/**
			 * @}
			 */
			
			/**
			 * @{
			 * @name Administration Permisions
			 */
			const C_STR_ADMIN					= "C_STR_ADMIN";
			
			const C_STR_PERMISION_ADMIN_VIEW = "EC7C865C-8D79-4027-8FBB-202544E2510E";
			const C_STR_PERMISION_ADMIN_VIEW_STATUS = "77B61D9E-D932-4D17-BF5A-B0B5EE3EF757";
			
			
			/**
			 * @}
			 */
			 
			/*
			 * 
			 */ 
			 
			public static function get_Constants($interface_group)
			{
				$arr_Output = array();
				
				switch($interface_group)
				{
					case self::C_STR_COMMENTING:
						$arr_Output['C_STR_PERMISION_COMMENTING_ALL_CRUD'] 		= self::C_STR_PERMISION_COMMENTING_ALL_CRUD;
						break;
					
					case self::C_STR_SAVED_QUERIES:
						$arr_Output['C_STR_PERMISION_SAVED_QUERY_ADD'] 		= self::C_STR_PERMISION_SAVED_QUERY_ADD;
						$arr_Output['C_STR_PERMISION_SAVED_QUERY_VIEW'] 	= self::C_STR_PERMISION_SAVED_QUERY_VIEW;
						$arr_Output['C_STR_PERMISION_SAVED_QUERY_DELETE'] 	= self::C_STR_PERMISION_SAVED_QUERY_DELETE;
						$arr_Output['C_STR_PERMISION_SAVED_QUERY_EDIT'] 	= self::C_STR_PERMISION_SAVED_QUERY_EDIT;
						break;
						
					case self::C_STR_STATISTICS:
						$arr_Output['C_STR_PERMISION_STATISTICS_VIEW'] 		= self::C_STR_PERMISION_STATISTICS_VIEW;
						break;

					case self::C_STR_HARVEST_REQUEST:
						$arr_Output['C_STR_PERMISION_HR_SUBMIT'] 			= self::C_STR_PERMISION_HR_SUBMIT;
						$arr_Output['C_STR_PERMISION_HR_VIEW_ALL'] 			= self::C_STR_PERMISION_HR_VIEW_ALL;
						$arr_Output['C_STR_PERMISION_HR_EDIT_OWN_STAGE1'] 	= self::C_STR_PERMISION_HR_EDIT_OWN_STAGE1;
						$arr_Output['C_STR_PERMISION_HR_EDIT_OWN_STAGE2'] 	= self::C_STR_PERMISION_HR_EDIT_OWN_STAGE2;
						$arr_Output['C_STR_PERMISION_HR_EDIT_ALL_STAGE1'] 	= self::C_STR_PERMISION_HR_EDIT_ALL_STAGE1;
						$arr_Output['C_STR_PERMISION_HR_EDIT_ALL_STAGE2'] 	= self::C_STR_PERMISION_HR_EDIT_ALL_STAGE2;
						$arr_Output['C_STR_PERMISION_HR_REQUEST_DEACTIVATE_OWN'] = self::C_STR_PERMISION_HR_REQUEST_DEACTIVATE_OWN;
						$arr_Output['C_STR_PERMISION_HR_REQUEST_DEACTIVATE_ALL'] = self::C_STR_PERMISION_HR_REQUEST_DEACTIVATE_ALL;
						$arr_Output['C_STR_PERMISION_HR_DEACTIVATE'] 		= self::C_STR_PERMISION_HR_DEACTIVATE;
						$arr_Output['C_STR_PERMISION_HR_VIEW_DISCUSSIONS'] 	= self::C_STR_PERMISION_HR_VIEW_DISCUSSIONS;
						$arr_Output['C_STR_PERMISION_HR_EDIT_DISCUSSIONS'] 	= self::C_STR_PERMISION_HR_EDIT_DISCUSSIONS;
						$arr_Output['C_STR_PERMISION_HR_EDIT_STATUS'] 		= self::C_STR_PERMISION_HR_EDIT_STATUS;
						break;
						
					case self::C_STR_GROUPS:
						$arr_Output['C_STR_PERMISION_GROUP_REQUEST'] 		= self::C_STR_PERMISION_GROUP_REQUEST;
						$arr_Output['C_STR_PERMISION_GROUP_APPROVE'] 		= self::C_STR_PERMISION_GROUP_APPROVE;
						$arr_Output['C_STR_PERMISION_GROUP_EDIT']			= self::C_STR_PERMISION_GROUP_EDIT;
						$arr_Output['C_STR_PERMISION_GROUP_VIEW_INFO'] 		= self::C_STR_PERMISION_GROUP_VIEW_INFO;
						$arr_Output['C_STR_PERMISION_GROUP_VIEW_PENDING'] 	= self::C_STR_PERMISION_GROUP_VIEW_PENDING;
						break;
						
					case self::C_STR_DATA:
						$arr_Output['C_STR_PERMISION_DATA_ADD'] 			= self::C_STR_PERMISION_DATA_ADD;
						$arr_Output['C_STR_PERMISION_DATA_DELETE'] 			= self::C_STR_PERMISION_DATA_DELETE;
						break;
						
					case self::C_STR_ADMIN:
						$arr_Output['C_STR_PERMISION_ADMIN_VIEW'] 			= self::C_STR_PERMISION_ADMIN_VIEW;
						$arr_Output['C_STR_PERMISION_ADMIN_VIEW_STATUS'] 	= self::C_STR_PERMISION_ADMIN_VIEW_STATUS;
						break;
				}
		
				return $arr_Output;
			}
		}
	//}
?>